/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity.report;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author GiangLT
 */
public class BroadcastProductionOfSyntax {

    private String syntax;
    private Integer production;
    private List<String> messages = new ArrayList<String>();
    private Integer mdnSuffixStartRange;
    private Integer mdnSuffixEndRange;

    public BroadcastProductionOfSyntax() {
    }

    public BroadcastProductionOfSyntax(String syntax, Integer production) {
        this.syntax = syntax;
        this.production = production;
    }

    public Integer getProduction() {
        return production;
    }

    public synchronized void setProduction(Integer production) {
        this.production = production;
    }
    
    public synchronized void addProduction(Integer production) {
        this.production += production;
    }
    public String getSyntax() {
        return syntax;
    }

    public void setSyntax(String syntax) {
        this.syntax = syntax;
    }

    public Integer getMdnSuffixStartRange() {
        return mdnSuffixStartRange;
    }

    public void setMdnSuffixStartRange(Integer mdnSuffixStartRange) {
        this.mdnSuffixStartRange = mdnSuffixStartRange;
    }

    public Integer getMdnSuffixEndRange() {
        return mdnSuffixEndRange;
    }

    public void setMdnSuffixEndRange(Integer mdnSuffixEndRange) {
        this.mdnSuffixEndRange = mdnSuffixEndRange;
    }

    public List<String> getMessages() {
        return messages;
    }

    public void setMessages(List<String> messages) {
        this.messages = messages;
    }

    public boolean addMessage(String message) {
        if (!messages.contains(message)) {
            return messages.add(message);
        }
        return false;
    }
}
